This application incorporates by reference Taiwanese application Serial No. 89111797, filed Jun. 16, 2000.
1. Field of the Invention
The invention relates to a method and system for digital versatile disk (DVD) decoding, and more particularly to a method and system for improving the error correcting rate and speed of DVD decoding.
2. Description of the Related Art
Referring now to FIG. 1, it illustrates a block diagram of conventional DVD encoding and decoding respectively. In the DVD encoding, firstly, a data message is inputted into an error detection code (EDC) appending unit 102, resulting in a data block which is formed by appending an EDC to the data message. The data block is then inputted into a scrambler 104 for scrambling the data block. After scrambling, sixteen scrambled data blocks are inputted into an outer code encoder 106 for outer code encoding, thus outputting an outer-code parity (PO). Next, the sixteen scrambled data blocks and PO are inputted into an inner code encoder 108 for inner code encoding, thus outputting an inner-code parity (PI). Then, this sixteen scrambled data blocks, PO and PI comprise an error correction code (ECC) block. After inputting the ECC block into an eight-to-fourteen modulation (EFM) modulator 110 for eight-to-fourteen modulation, the modulated ECC block is stored in a DVD 112.
As for DVD decoding, it is the reverse process of the DVD encoding. Firstly, data read from the DVD 112 are transferred to EFM demodulator 114 for performing eight-to-fourteen demodulation, obtaining an ECC block. The ECC block is then inputted into the inner code decoder 116 for inner code decoding. Next, the inner code decoded ECC block is transferred to the outer code decoder 118 for outer code decoding, resulting in a number of scrambled data blocks. The de-scrambler 120 then descrambles the scrambled data blocks, outputting a number of data blocks. Finally, before outputting the data blocks, they are checked by an EDC check unit 122.
Referring to FIGS. 2A-2B, they illustrate a data sector before scrambling and an ECC block respectively. In FIG. 2A, a data sector 200 contains 12 rowxc3x97172 column data symbols, i.e. a row in the data sector 200 contains 172 bytes. Besides, there is a four-byte EDC followed by the twentieth row in the data sector.
In FIG. 2B, it shows that source data 204 consists of sixteen scrambled data sectors, each of which is designated by numeral 1 to 16 respectively. The source data 204 has 192 rows of data and each row contains 172 bytes, i.e. the source data 204 contains 172 columns of data. When performing outer code encoding, the outer code encoder 106 processes the source data 204 according to the Y-direction, obtaining outer code parity following the columns of the source data 204. The outer code parity, or PO, contains 16 rows of 172-byte data, corresponding to the 172 columns of the source data 204. The source data 204 and the PO are designated a Reed-Solomon (RS) outer code. When performing inner code encoding, the inner code encoder 108 processes the source data 204 and the PO according to the X-direction, obtaining inner code parity following the rows of the source data 204. The inner code parity, or PI, has 208 (=192+16) rows of 10-byte data, corresponding to the 208 rows of the source data 204 and PO. The source data 204, PO and PI comprise the ECC block 206.
Referring to FIG. 3, it shows a DVD decoding system according to the process shown in FIG. 1, in block diagram form. Firstly, an EFM demodulator 304 receives and processes message data read from DVD 302, obtaining the ECC block 206. The ECC block 206 is then delivered through bus 306 to data buffer 308 for storage. Next, inner code decoder 310 reads the ECC block 206 from the data buffer 308 and performs inner code decoding for detecting and correcting errors of the ECC block 206. After that, the inner code decoder 310 writes the corrected data into the data buffer 308. Outer code decoder 312 then reads the corrected ECC block 206 from the data buffer 308 and performs outer code decoding for detecting and correcting errors of the source data 204 in the ECC block 206. After that, the outer code decoder 312 writes the corrected data into the data buffer 308.
Next, descrambling and EDC checking unit 314 reads the source data of the ECC block 206, which are scrambled when encoding, from the data buffer 308 for performing descrambling and EDC check. When the host requests for reading the source data of the data buffer 308, descrambler 316 reads the ECC block 206 from the data buffer 308 for descrambling and then sends the descrambled source data to the host. It is desired to reduce the times of access to the data buffer 308 so that, in the decoding process above, the descrambling and EDC checking unit 314 performs descrambling and EDC check at the same time. Besides, when the EDC check result of the descrambling and EDC checking unit 314 indicates that the source data are corrected, the source data (after descrambling and EDC checking unit 314) are delivered to the host.
In the conventional DVD decoding system described above, there are disadvantages as follows.
1. A data buffer is necessary for every stage of the decoding in the system where respective components share one data buffer. During the decoding, it is required to access to the data buffer for a number of times, resulting in a limitation in the speed of DVD decoding.
2. It is known that the error correction capability of the DVD decoding system can be improved by repeating the inner code and outer code decoding. However, the repetition of the inner code and outer code decoding is time-consuming, and thus the speed of the decoding will be lowered. Since the decoding system cannot differentiate between the region of data which has erroneous data and the region which has not in the source data 204, the inner code or outer code decoding can only be performed for the whole source data 204 for each decoding.
3. If there are too much erroneous data to be corrected, the results of the inner code and outer code decoding may still be mistaken, leading to a situation that some of the data become erroneous after error correction.
It is therefore an object of the invention to provide a method and system for optical disk decoding by adjusting the sequence of the decoding and performing error detection code (EDC) checking during inner code decoding. In this way, it reduces the memory access time, increases the decoding speed, and improves the error correction capability.
According to the object of the invention, it provides a method for optical disk decoding, which is for decoding an error correction code (ECC) block. The method includes the steps as follows.
(a) It is determined whether it is to perform outer code decoding first. If so, the method proceeds to step (b). If not, the method proceeds to step (d).
(b) Inner code decoding and EDC checking is performed.
(c) It is determined whether one of the conditions is true: (1) error correction is complete; (2) the number of errors is over the limitation of error correction so that the error-correcting operation cannot be performed; or (3) the decoding operations are performed for a number of times but the correction is not complete. If so, the method proceeds to step (f); if not, the method proceeds to step (d).
(d) Outer code decoding is performed.
(e) It is determined whether one of the following is true: (1) the error correction is complete; (2) the number of errors is over the limitation of error correction so that the error-correcting operation cannot be performed; or (3) the decoding operations are performed for a number of times but the correction is not complete. If so, the method proceeds to step (f); if not, the method proceeds to step (b).
(f) Descrambling is performed.
(g) EDC checking is performed.
According to the object of the invention, it provides a method of optical disk inner code decoding, which is for decoding an error correction code (ECC) block. The ECC block includes a number of data sectors each of which includes a number of rows of data. The method includes the steps as follows.
(a1) It is determined whether the K-th data sector corresponding to the I-th row is set to be correct. If so, the method proceeds to step (g1); if not, the method proceeds to steps (b1) and (h1) simultaneously.
(b1) It is determined whether a syndrome corresponding to the I-th row is equal to zero. If so, the method proceeds to steps (e1); if not, the method proceeds to steps (c1).
(c1) Decoding the data of the I-th row is performed.
(d1) It is determined whether the decoding of the data of the I-th row is complete. If so, the method proceeds to step (e1); if not, the method proceeds to step (f1).
(e1) The data of the I-th row are corrected and are set to be correct, and the method proceeds to step (g1).
(f1) An erasure flag corresponding to the I-th row is set to be a first value.
(g1) It is determined whether the inner code decoding of the entire ECC block is complete. If so, the method is terminated; if not, the method is repeated from the step (a1) for the (K+1)th data sector.
(h1) Descrambling is performed.
(i1) It is determined whether the following is true: the K-th data sector is passed in the EDC check and is set to be correct; and no error correction is performed on the K-th data sector. If so, the method proceeds to step (j1); if not, the method proceeds to step (k1).
(j1) The K th data sector is set to be correct. (k1) The K-th data sector is set to be undetermined.
According to the object of the invention, it provides a method for optical disk outer code decoding, which is for decoding an error correction code (ECC) block. The ECC block includes a number of data sectors. Each of the data sectors includes a number of columns of data and each of the columns of data corresponds to one of the data sectors. The method includes the following steps.
(a2) It is determined whether a syndrome corresponding to the J-th column is equal to zero. If so, the method proceeds to step (g2); if not, the method proceeds to step (b2).
(b2) Decoding the data of the J-th column is performed.
(c2) It is determined whether the decoding of the data of the J-th column is complete. If so, the method proceeds to step (d2); if not, the method proceeds to steps (f2).
(d2) It is determined whether the data sector where a correction obtained from the decoding of the step (b2) belongs is passed in the EDC check. If so, the method proceeds to step (e2); if not, the method proceeds to steps (g2).
(e2) The data sector are reserved.
(f2) An erasure flag corresponding to the J-th column is set to be a first value and the method proceeds to step (i2).
(g2) The data of the J-th column are corrected.
(h2) The J-th column is set to be correct.
(i2) It is determined whether the outer code decoding of the entire EGG block is complete. If so, the method is terminated; if not, the method is repeated from the step (a2) after increasing the value of J by one.
According to the object of the invention, it provides a system for optical disk decoding, which is for receiving message data from an optical disk, and for decoding an error correction code (ECC) block of the message data. The system includes an eight-to-fourteen modulation (EFM) demodulator, an inner code decoder, an outer code decoder, a descrambling and EDC checking unit, and a descrambler. The EFM demodulator is used for receiving the message data from the optical disk and performing EFM demodulation of the message data. After EFM demodulation, the ECC block is obtained. The inner code decoder is for performing inner code decoding of the ECC block while the outer code decoder is for performing outer code decoding of the ECC block. The descrambling and EDC checking unit is used for performing descrambling and EDC checking. The descrambler is for performing descrambling. The ECC block is inputted into the descrambling and EDC checking unit as the ECC block is inputted into the inner code decoder. In addition, the EDC checking of the ECC block is performed during the outer code decoding of the ECC block.